﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using DAL;
using Models;

namespace BLL
{
    /// <summary>
    /// 收藏表
    /// </summary>
   public class CollectionBLL
    {
        //商品收藏
        public static int collectionSCBLL(Collection c) {
            return CollectionDAL.collectionSC(c);
        }
        //商品收藏取消
        public static bool collectionQXBLL(int id) {
            return CollectionDAL.collectionQX(id)>0;
        }
        //收藏刷新
        public static DataTable collectionSXBLL() {
            return CollectionDAL.collectionSX();
        }
        //菜品名称查询
        public static DataTable cpmcBLL(string name) {
            return CollectionDAL.cpmc(name);
        }
        //菜品名称查询
        public static DataTable yhmcBLL(int id)
        {
            return CollectionDAL.yhmc(id);
        }
        //用户菜品名称查询
        public static DataTable yhcpBLL(int id, string name) {
            return CollectionDAL.yhcp(id,name);
        }
        //根据id查询
        public static DataTable collectionIDBLL(int id) {
            return CollectionDAL.collectionID(id);
        }
        //前台id查询
        public static DataTable phSCIDBLL(int id) {
            return CollectionDAL.phSCID(id);
        }
        //前台商品收藏取消
        public static bool qhQXBLL(int id) {
            return CollectionDAL.qhQX(id)>0;
        }
    }
}
